package com.lmh.graphdisease.utils.ACKMPTree;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lmh
 * @desc
 * @date 2023/3/20
 */
public class TestAC {
    public static void main(String[] args) {
        List<String> keyWords = new ArrayList<>();
        keyWords.add("黎明");
        keyWords.add("名酒");
        keyWords.add("交代好了");
        String s = "今早黎明，姓名酒其的人就交代好了";
        ACTree acTree = new ACTree(keyWords);
        ACFilter filter = new ACFilter(acTree);
        String[] strings = filter.filter(s);
        for (String s1:strings){
            System.out.print(s1);
        }
    }
}
